From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code using RXTX.This same code reads fine from other devices which do not send data in Hex format. Also, the same code when run under MS Windows, reads the first two values (3.16, 8.36) correctly about 90% of the time. But under Linux, it always loses binary data in several bytes. The loss occurs throughout the length of the Hex string at different times. I can rule out hardware / OS issues because cutecom is unfailingly giving correct readings all the time. I am lost as to what could be causing this behaviour? I have changed my read methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed input streams to Java standard input stream and RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], (value of binary data) integer array[ ]. But no variation in technique is helping me to read the binary stream without loss. I have also run the program under SunJava and Openjdk. Any help will be greatly thanked for and appreciated in understanding the possible flaws in code. May I request that anybody willing to help will show the necessary changes in the attached code itself? (code is attached below) I just want to read the binary data or the integer equivalent . I have the decoding algorithm with me. I am using java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped with Sun Java 1.6.u25) OpenJDK Server VM (build 20.0-b11, mixed mode) and RXTX-2.1-7 and Netbeans 7.0.1 for development. import gnu.io.*; import java.io.*; import java.util.*; import java.util.TooManyListenersException; import java.util.logging.Level; import java.util.logging.Logger; public class DeviceFinal { public static CommPortIdentifier portId; public static SerialPort serialPortUltra; public static InputStream myIn; public static DataInputStream dIns; public static OutputStream myOs; public static String portName="/dev/ttyS3"; //public static String portName="COM1"; public static RXTXPort rxtxport; public static void HwDeviceTest(){ try {// try block no 1: to open port //portId=CommPortIdentifier.getPortIdentifier(portName); portId=CommPortIdentifier.getPortIdentifier(portName); rxtxport=(RXTXPort)portId.open("Device Port",2000); try{// try block 2 inside 1 : seting port parameters rxtxport.setSerialPortParams(2400,8,1,0); rxtxport.setFlowControlMode(0); try { // try block 3 inside 2 of 1 : setting input stream //myIn=rxtxport.getInputStream(); myIn=rxtxport.getInputStream(); } catch (Exception ex) { System.err.print("IO Exception occured"); }// try block 3 inside 2 of 1 ends here try { // Inside 3nd Try of Second. setting output parameters myOs=new FileOutputStream("myfile.txt"); } catch (IOException ex) { System.err.println("Can't open output stream"); } try{ // try block 4 inside 2 of 1 : dat avaliable notification try{ // checking for data avaliable rxtxport.notifyOnDataAvailable(true); }catch(NullPointerException ee){ } rxtxport.enableReceiveTimeout(60); rxtxport.addEventListener(new Devicedata(serialPortUltra)); }catch(TooManyListenersException e){ } }catch(UnsupportedCommOperationException e12){ System.err.println("comm port not supported"); } // try block 2 inside 1 ends here } catch (NoSuchPortException ex) { System.err.println("Sorry! Cannot find port!"+portName); } catch (PortInUseException ex1) { System.err.println("port In use exception occured"); } // try block no1 ends here } // Start of inner class public static class Devicedata implements SerialPortEventListener { public byte[] tempByte=new byte[30]; public byte[ ] byteArray=new byte[25]; public byte[ ][ ] byteStoreArray=new byte[25][240]; public int[ ] noOfBytesArray= new int[25]; public int[ ] intArray=new int[30]; StringBuffer strBuffer; byte[] buffer = new byte[1024]; int counter=0; public Devicedata(SerialPort portname){ } public void serialEvent(SerialPortEvent event){ //System.out.println("Trying to read from Device"); int data; try { int len = 0; while ( ( data = myIn.read()) > -1 ) { System.out.println("data="+data); } }catch ( IOException e ){ e.printStackTrace(); } } }// end of inner class public static void main(String[] args) { // TODO code application logic here DeviceFinal.HwDeviceTest(); } } OUTPUT WHEN RUN IN LINUX run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=224 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 data=3 data=0 data=144 data=16 or 1 data=50 data=64 or 4 data=2 data=85 data=0 data=0 data=0 data=0 data=0 data=0 data=134 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 data=0 Regards Vishal Prasad Java developer with extensive RXTX API Bangalore, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From damorales at gmail.com Thu Sep 22 10:57:57 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Thu, 22 Sep 2011 13:57:57 -0300 Subject: [Rxtx] RXTX issue for not reading some dat In-Reply-To: References: Message-ID: Have you tried purejavacomm ?? Greetings! 2011/9/22 vishal prasad > Hi, > > Subject: RXTX losing data while reading from a device. > > I am trying to read data from a device which sends hex data,like > > Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 > 00 00 00 00 00 00 > > Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values > displayed on Device 3.16 8.36 29.3 10.04. > > The above data format and conversion have been obtained form cutecom, a Qt > based serial Terminal program for Linux. > As shown, the conversion and device readings are exact. > > I am trying to fine tune the Java code so that I can read the data from the > Device as consistently and correctly as cutecom does. > > After several attempts at fine tuning, I am still not able to read > correctly and consistently from the device with my Java code using RXTX.This > same code reads fine from other devices which do not send data in Hex > format. Also, the same code when run under MS Windows, reads the first two > values (3.16, 8.36) correctly about 90% of the time. But under Linux, it > always loses binary data in several bytes. The loss occurs throughout the > length of the Hex string at different times. I can rule out hardware / OS > issues because cutecom is unfailingly giving correct readings all the time. > I am lost as to what could be causing this behaviour? I have changed my read > methods to , read(), read(bytes), read(bytes,offset,lenght), I have changed > input streams to Java standard input stream and > RXTXPORT.SerialPortInputstream. I have stored the binary data in bytes[ ], > (value of binary data) integer array[ ]. But no variation in technique is > helping me to read the binary stream without loss. > > I have also run the program under SunJava and Openjdk. > > Any help will be greatly thanked for and appreciated in understanding the > possible flaws in code. May I request that anybody willing to help will show > the necessary changes in the attached code itself? > > (code is attached below) > I just want to read the binary data or the integer equivalent . I have the > decoding algorithm with me. > > I am using java version "1.6.0_22" > OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) ( swapped > with Sun Java 1.6.u25) > > OpenJDK Server VM (build 20.0-b11, mixed mode) > and RXTX-2.1-7 and Netbeans 7.0.1 for development. > > import gnu.io.*; > import java.io.*; > import java.util.*; > import java.util.TooManyListenersException; > import java.util.logging.Level; > import java.util.logging.Logger; > > public class DeviceFinal { > > > public static CommPortIdentifier portId; > public static SerialPort serialPortUltra; > public static InputStream myIn; > public static DataInputStream dIns; > public static OutputStream myOs; > public static String portName="/dev/ttyS3"; > //public static String portName="COM1"; > public static RXTXPort rxtxport; > > > public static void HwDeviceTest(){ > > try {// try block no 1: to open port > //portId=CommPortIdentifier.getPortIdentifier(portName); > portId=CommPortIdentifier.getPortIdentifier(portName); > rxtxport=(RXTXPort)portId.open("Device Port",2000); > > try{// try block 2 inside 1 : seting port parameters > rxtxport.setSerialPortParams(2400,8,1,0); > rxtxport.setFlowControlMode(0); > > try { // try block 3 inside 2 of 1 : setting input stream > //myIn=rxtxport.getInputStream(); > myIn=rxtxport.getInputStream(); > } catch (Exception ex) { > System.err.print("IO Exception occured"); > }// try block 3 inside 2 of 1 ends here > try { // Inside 3nd Try of Second. setting output > parameters > myOs=new FileOutputStream("myfile.txt"); > > } catch (IOException ex) { > System.err.println("Can't open output stream"); > } > try{ // try block 4 inside 2 of 1 : dat avaliable > notification > > try{ // checking for data avaliable > rxtxport.notifyOnDataAvailable(true); > }catch(NullPointerException ee){ > > } > rxtxport.enableReceiveTimeout(60); > rxtxport.addEventListener(new > Devicedata(serialPortUltra)); > }catch(TooManyListenersException e){ > > } > }catch(UnsupportedCommOperationException e12){ > System.err.println("comm port not supported"); > } // try block 2 inside 1 ends here > > } catch (NoSuchPortException ex) { > System.err.println("Sorry! Cannot find port!"+portName); > } catch (PortInUseException ex1) { > System.err.println("port In use exception occured"); > } // try block no1 ends here > > } > > // Start of inner class > public static class Devicedata implements SerialPortEventListener { > > public byte[] tempByte=new byte[30]; > public byte[ ] byteArray=new byte[25]; > public byte[ ][ ] byteStoreArray=new byte[25][240]; > public int[ ] noOfBytesArray= new int[25]; > public int[ ] intArray=new int[30]; > StringBuffer strBuffer; > byte[] buffer = new byte[1024]; > int counter=0; > public Devicedata(SerialPort portname){ > > } > public void serialEvent(SerialPortEvent event){ > //System.out.println("Trying to read from Device"); > > > > int data; > > try > { > int len = 0; > while ( ( data = myIn.read()) > -1 ) > { > System.out.println("data="+data); > } > > }catch ( IOException e ){ > e.printStackTrace(); > > } > > } > }// end of inner class > public static void main(String[] args) { > // TODO code application logic here > DeviceFinal.HwDeviceTest(); > } > } > > OUTPUT WHEN RUN IN LINUX > > run: > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS3 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=224 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > EXPECTED OUTPUT for actual reading in device- 3.0 9.1 32.4 2.55 > data=3 > data=0 > data=144 > data=16 or 1 > data=50 > data=64 or 4 > data=2 > data=85 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=134 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > data=0 > > Regards > Vishal Prasad > Java developer with extensive RXTX API > Bangalore, India > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pawan.Kharbanda at dot.state.co.us Fri Sep 2 14:02:04 2011 From: Pawan.Kharbanda at dot.state.co.us (Kharbanda, Pawan) Date: Fri, 2 Sep 2011 14:02:04 -0600 Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit In-Reply-To: <4E48F6A7.5080003@sandglass-software.com> References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: Hi -- Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From os.dexterity at ymail.com Sat Sep 3 10:16:08 2011 From: os.dexterity at ymail.com (Osama Salah) Date: Sat, 3 Sep 2011 09:16:08 -0700 (PDT) Subject: [Rxtx] RXTX Crash problem on Windows 7 64 bit [Solution] In-Reply-To: References: <1313267817.67389.YahooMailNeo@web160204.mail.bf1.yahoo.com> <63F4A5840DC2493F8AD06A58A2B137ED@mdam3> <4E486CD9.9010408@t-online.de> <1313385933.83142.YahooMailNeo@web160218.mail.bf1.yahoo.com> <4E48DC08.8000801@sandglass-software.com> <4E48EC3B.8090707@t-online.de> <4E48F6A7.5080003@sandglass-software.com> Message-ID: <1315066568.28704.YahooMailNeo@web160217.mail.bf1.yahoo.com> I tried to enable the receive time out, and this solved the problem completely on my Windows 7 X64, but I don't know if this solution is reliable or not, so please everyone, test it on your program and send back the result, including your operating system and USB2Serial converter type. The receive timeout feature can be enabled by adding the following line: commPort.enableReceiveTimeout(500); just after opening the commPort (i.e. "commPort = portIdentifier.open(className,2000);") Waiting for your response. Thanks, Osama ________________________________ From: "Kharbanda, Pawan" To: "rxtx at qbang.org" Sent: Friday, September 2, 2011 10:02 PM Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit Hi -- ? Are these changes in CVS? Its very hard to keep track of changes on a Mailing List. Thanks ~pk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Adrian Crum Sent: Monday, August 15, 2011 4:36 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit http://bugzilla.qbang.org/ -Adrian On 8/15/2011 10:51 AM, Alfred Fuchs wrote: > Hello Adrian, > > I didn't find a place where to post bug-fixes (or suggestions), so i > posted them to this list. > > Posting a known bug to the bug tracker? > What is the right procedure to send fixes? > > I need help! > > Another question: > For Java programers who have to do with microcontrollers rxtx is a > very important library. Would sourceforce not be a better place? > (Simple check out etc.) > > -Alfred > > > > On 2011-08-15 10:42, Adrian Crum wrote: >> Don't forget we have a bug tracker for this sort of thing. >> >> -Adrian >> >> On 8/15/2011 6:25 AM, Osama Salah wrote: >>> Thanks Alfred, but I couldn't recompile under Windows, the following >>> message is displayed: >>> >>> "C:\Program' is not recognized as an internal or external command" >>> >>> it seems that spaces in file names are not allowed inside "Makefile" >>> :( >>> >>> So please send the compiled files, or upload them to a file-hosting >>> server. >>> >>> Thanks, >>> Osama Salah >>> >>> -------------------------------------------------------------------- >>> ---- >>> >>> *From:* Alfred Fuchs >>> *To:* M.Dec-GM ; rxtx at qbang.org >>> *Sent:* Monday, August 15, 2011 2:48 AM >>> *Subject:* Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> >>> OK, attachements are too big, >>> so only the compressed diffs. >>> >>> sorry! >>> >>> >>> Hi, >>> >>> source: rxtx-2.2pre2 from 2011-08-14. >>> >>> i made some little changes to the code: >>> >>> File SerialImp.c: >>> 1) in RXTXPort(eventLoop): malloc the event_info_struct and free it >>> in finalize_event_info_struct() (hope this is the right place to do >>> this). >>> >>> This fixes the "close" bug on my MacOSX 1.5 (64 bit) and my Linux >>> 2.6.37.6-0.7-desktop x86_64 (64 bit). >>> >>> >>> 2) set the "eis" field to NULL in finalize_event_info_struct. >>> >>> 3) replaced all long with jlong, int with jint and int with pid_t, >>> where necessary >>> >>> 4) replaced get_java_var with more specific methodes: >>> f.e get_java_var_fd, get_java_var_eis, etc. >>> >>> 5) added a compile-time check for critical variable-sizes. >>> >>> >>> File SerialImp.h: >>> added the function declartions. >>> >>> >>> Dont know if You have usage for this code. >>> >>> >>> Regards, >>> Alfred >>> >>> >>> On 2011-08-14 08:36, M.Dec-GM wrote: >>> > Hi, >>> > I have found solution for "close() problem" for 32 bit systems >>> W/M/L in 2.2 pre. >>> > I have written about it many times on this mailing list, starting >>> from Nov. 2009 and later with another useful examples. >>> > Look for it and try it, maybe helps. >>> > Regards >>> > Mariusz >>> > >>> > >>> > ----- Original Message ----- >>> > From: Milton T. >>> > To: Osama Salah ; rxtx at qbang.org >>> > Sent: Sunday, August 14, 2011 7:57 AM >>> > Subject: Re: [Rxtx] RXTX Crash problem on Windows 7 64 bit >>> > >>> > >>> > This also happens on the Mac OSX. I think that i'm going to look >>> into this issue sometime next month. >>> > >>> > >>> > On Sat, Aug 13, 2011 at 3:36 PM, Osama >>> Salah> wrote: >>> > >>> > Hello, >>> > I think everyone knows about this issue; RXTX can't close serial >>> ports on Windows 7 64 bit, and Java crashes! I googled for this >>> problem and found that many programmers suffer from it, but no >>> solution. Have anyone found a solution for this problem ? >>> > Thanks >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> -------------------------------------------------------------------- >>> ---------- >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> > >>> > >>> > >>> > >>> > _______________________________________________ >>> > Rxtx mailing list >>> > Rxtx at qbang.org >>> > http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From amus7380 at gmail.com Mon Sep 5 19:25:41 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 11:25:41 +1000 Subject: [Rxtx] Calls to SerialPort.removeEventListener cause a subsequent call to SerialInputStream.read() to crash during its call to the native readByte method. Message-ID: I've raised this as a bug in bugzilla (http://bugzilla.qbang.org/show_bug.cgi?id=178), however I thought I'd query the community to see if anyone has come accross a similar problem; basically when using the win 32 rxtx-2.2pre2 that a call to removeEventListener() causes a subsequent call to SerialInputStream.read() to crash (the crash occurs inside the native readByte method). I haven't been able to reproduce this issue in the linux version. Has anyone else come across this issue? The error printed to the console is something like the below: RXTXPort:enableReceiveTimeout() called RXTXPort:enableReceiveTimeout() returning RXTXPort:removeEventListener() called RXTXPort:Interrupt=true RXTXPort:calling interruptEventLoop RXTXPort:calling monThread.join() eventLoop() returned RXTXPort:removeEventListener() returning RXTXPort:SerialInputStream:read() called +++++++++ read() monThreadisInterrupted RXTXPort:SerialInputStream:read() L RXTXPort:SerialInputStream:read() N An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x71083E68 Function=Java_gnu_io_RXTXPort_nativeavailable+0xBC Library=C:\Projects\Libraries\rxtx\rxtx-2.2pre2-bins\win32\rxtxSerial.dll Current Java thread: at gnu.io.RXTXPort.readByte(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1298) - locked <0x10046238> (a gnu.io.RXTXPort$SerialInputStream) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.connect (TwoWaySerialComm.java:75) at com.fcs.comms.wrappers.rxtx.simpletwoway.TwoWaySerialComm.main (TwoWaySerialComm.java:193) Dynamic libraries: 0x00400000 - 0x00407000 C:\j2sdk1.4.2_04\bin\javaw.exe 0x775B0000 - 0x77730000 C:\Windows\SysWOW64\ntdll.dll 0x75480000 - 0x75590000 C:\Windows\syswow64\kernel32.dll 0x769D0000 - 0x76A16000 C:\Windows\syswow64\KERNELBASE.dll 0x76480000 - 0x76520000 C:\Windows\syswow64\ADVAPI32.dll 0x76C60000 - 0x76D0C000 C:\Windows\syswow64\msvcrt.dll 0x76A30000 - 0x76A49000 C:\Windows\SysWOW64\sechost.dll 0x76EB0000 - 0x76FA0000 C:\Windows\syswow64\RPCRT4.dll 0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll 0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll 0x770B0000 - 0x771B0000 C:\Windows\syswow64\USER32.dll 0x76FA0000 - 0x77030000 C:\Windows\syswow64\GDI32.dll 0x75270000 - 0x7527A000 C:\Windows\syswow64\LPK.dll 0x751D0000 - 0x7526D000 C:\Windows\syswow64\USP10.dll 0x75170000 - 0x751D0000 C:\Windows\system32\IMM32.DLL 0x76B90000 - 0x76C5C000 C:\Windows\syswow64\MSCTF.dll 0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll 0x734E0000 - 0x73512000 C:\Windows\system32\WINMM.dll 0x74540000 - 0x7458C000 C:\Windows\system32\apphelp.dll 0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll 0x001A0000 - 0x001AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll 0x001B0000 - 0x001C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll 0x001D0000 - 0x001DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll 0x71080000 - 0x71098000 C:\Projects\Libraries\rxtx\rxtx-2.2pre2- bins\win32\rxtxSerial.dll 0x76230000 - 0x7625A000 C:\Windows\syswow64\imagehlp.dll 0x749F0000 - 0x74ADB000 C:\Windows\syswow64\dbghelp.dll 0x76A20000 - 0x76A25000 C:\Windows\syswow64\PSAPI.DLL Heap at VM Abort: Heap def new generation total 576K, used 340K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 54% used [0x10010000, 0x100552e8, 0x10090000) from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 52K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 3% used [0x104f0000, 0x104fd1e0, 0x104fd200, 0x10650000) compacting perm gen total 4096K, used 1287K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 31% used [0x14010000, 0x14151d08, 0x14151e00, 0x14410000) Local Time = Tue Sep 06 11:07:47 2011 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode) # # An error report file has been saved as hs_err_pid5604.log. # Please refer to the file for further information. # From amus7380 at gmail.com Mon Sep 5 20:20:05 2011 From: amus7380 at gmail.com (Alex Mustafa) Date: Tue, 6 Sep 2011 12:20:05 +1000 Subject: [Rxtx] Unable to reach cvs respository Message-ID: The cvs repository (as documented http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is presently timing out for me. Is the document repository still active / the right place to get the latest RXTX source? thanks, Alex. From tjarvi at qbang.org Tue Sep 6 03:31:52 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Sep 2011 03:31:52 -0600 (MDT) Subject: [Rxtx] Unable to reach cvs respository In-Reply-To: References: Message-ID: On Tue, 6 Sep 2011, Alex Mustafa wrote: > The cvs repository (as documented > http://rxtx.qbang.org/wiki/index.php/Retrieving_Source_Code) is > presently timing out for me. > > Is the document repository still active / the right place to get the > latest RXTX source? > Hi Alex, I just tried this remotely and it is working. That is the right place but you want to get the commapi-0-0-1 branch like the page mentions. cvs checkout -r commapi-0-0-1 rxtx-devel -- Trent Jarvi tjarvi at qbang.org From pedro at inlocsistemas.com.br Thu Sep 15 10:53:52 2011 From: pedro at inlocsistemas.com.br (=?ISO-8859-1?Q?Pedro_Eug=EAnio?=) Date: Thu, 15 Sep 2011 13:53:52 -0300 Subject: [Rxtx] RXTX x64 and x86 Message-ID: Hi everyone, I've a software where I use RXTXcomm.jar on an applet java and inside applet I'm communicating with port serial, so, I need to communicate and it works with 2 versions, x86 and x64, but RXTXcomm.jar has the same name to 2 files, How can I use both jars in my application? -- Thanks, Pedro Eug?nio -------------- next part -------------- An HTML attachment was scrubbed... URL: From phelipemaia at gmail.com Tue Sep 20 07:35:18 2011 From: phelipemaia at gmail.com (Phelipe Maia) Date: Tue, 20 Sep 2011 10:35:18 -0300 Subject: [Rxtx] RxTx on Mac OS X - Installation problems Message-ID: Hey guys, I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: *checking os.name * *Mac OS X* *checking os.arch * *x86_64* *checking java.vendor * *Apple Inc.* *checking java.version * *1.6.0_26* *checking os.version * *10.8.0* *./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* *./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *WARNING: configure is having a hard time determining which* *directory contains the file jni_md.h. Edit Makefile and fix the* *variable JAVANATINC to point to the correct directory.* * * *The following options are available:* *find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory* * * *If there are more than one option available the first was selected.* * * *Warning: no universal SDK, will not build universal* *library os.arch... x86_64* And when I call make, shows the following error: *glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o* *In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory * *In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4:* *./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *.../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring?* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory* *i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory* *make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1* What Should I have to do to solve this problem? Sorry about the newbie question... In the README.OSX file has a part the say: "*Put * * libSerial.jnilib* *in the directory of the application (the JavaVM will find it there). Add* * RXTXComm.jar* *to the application classpath or include the classes in the application jar. * *(Some applications already include the RXTX classes in their application jar,* *in which case only the file libSerial.jnilib is required).*" What is the "*directory of the application*"? -- Atenciosamente Phelipe Maia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartley at cmu.edu Tue Sep 20 07:57:53 2011 From: bartley at cmu.edu (Chris Bartley) Date: Tue, 20 Sep 2011 09:57:53 -0400 Subject: [Rxtx] RxTx on Mac OS X - Installation problems In-Reply-To: References: Message-ID: <50C70468-882F-4F39-A5C4-29BAFA3AEF5F@cmu.edu> I think I had the same issues when I built for Snow Leopard. Here's a README detailing how I worked around the issues: http://code.google.com/p/create-lab-commons/source/browse/trunk/java/lib/rxtx/README.txt I made some small changes to the source, too, which the README describes. Here are pre-built binaries if you just want to use those: http://code.google.com/p/create-lab-commons/source/browse/#svn%2Ftrunk%2Fjava%2Flib%2Frxtx best, Chris On Sep 20, 2011, at 9:35 AM, Phelipe Maia wrote: > Hey guys, > > I have some issues to install RxTx on Mac OS X (Snow Leopard - 10.6.8). I was reading the README.OSX file, but I didn't complete the installation. When I call /configure, it shows the following error: > checking os.name > Mac OS X > checking os.arch > x86_64 > checking java.vendor > Apple Inc. > checking java.version > 1.6.0_26 > checking os.version > 10.8.0 > ./configure: line 21808: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > ./configure: line 21809: cd: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > WARNING: configure is having a hard time determining which > directory contains the file jni_md.h. Edit Makefile and fix the > variable JAVANATINC to point to the correct directory. > > The following options are available: > find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers: No such file or directory > > If there are more than one option available the first was selected. > > Warning: no universal SDK, will not build universal > library os.arch... x86_64 > > And when I call make, shows the following error: > > glibtool: compile: gcc -I.../rxtx-2.2pre2 -Ii386-apple-darwin10.8.0 -I. -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../../../Headers/ -g -O2 -D_BSD_SOURCE -bundle -c .../rxtx-2.2pre2/./src/fuserImp.c -fno-common -DPIC -o .../rxtx-2.2pre2/i386-apple-darwin10.8.0/.libs/fuserImp.o > In file included from .../rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:2:17: error: jni.h: No such file or directory > In file included from .../bin/rxtx-2.2pre2/./src/fuserImp.c:4: > ./gnu_io_CommPortIdentifier.h:27: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > .../rxtx-2.2pre2/./src/fuserImp.c:7: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?jstring? > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/SerialImp.o: No such file or directory > i686-apple-darwin10-llvm-gcc-4.2: .../rxtx-2.2pre2/i386-apple-darwin10.8.0/fuserImp.o: No such file or directory > make: *** [i386-apple-darwin10.8.0/librxtxSerial.jnilib] Error 1 > > What Should I have to do to solve this problem? Sorry about the newbie question... > > In the README.OSX file has a part the say: "Put > libSerial.jnilib > in the directory of the application (the JavaVM will find it there). Add > RXTXComm.jar > to the application classpath or include the classes in the application jar. > (Some applications already include the RXTX classes in their application jar, > in which case only the file libSerial.jnilib is required)." What is the "directory of the application"? > > -- > > Atenciosamente > Phelipe Maia > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From vishal.pdmail at gmail.com Thu Sep 22 09:25:39 2011 From: vishal.pdmail at gmail.com (vishal prasad) Date: Thu, 22 Sep 2011 20:55:39 +0530 Subject: [Rxtx] RXTX issue for not reading some dat Message-ID: Hi, Subject: RXTX losing data while reading from a device. I am trying to read data from a device which sends hex data,like Hex Data : 03 03 16 086)0 100 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 Converted Data (Of interest to me ) 3.16 8.36 29.3 10.04 for values displayed on Device 3.16 8.36 29.3 10.04. The above data format and conversion have been obtained form cutecom, a Qt based serial Terminal program for Linux. As shown, the conversion and device readings are exact. I am trying to fine tune the Java code so that I can read the data from the Device as consistently and correctly as cutecom does. After several attempts at fine tuning, I am still not able to read correctly and consistently from the device with my Java code usin